import type { IRoute } from 'umi';

const routes: IRoute[] = [
  { path: '/login', component: '@/pages/Login' },
  {
    path: '/home',
    component: '@/pages/Home',
    exact: false,
    wrappers: ['@/wrappers'],
    routes: [
      {
        path: '/',
        component: '@/layouts',
        routes: [
          { path: '/home', component: '@/pages/Routine', exact: true },
          // 图表放大版
          { path: '/home/bkh', component: '@/pages/Echars/BigKh' },
          { path: '/home/collecting', component: '@/pages/Echars/BigLy' },
          { path: '/home/jzpg', component: '@/pages/Echars/BigJz' },
          { path: '/home/khfl', component: '@/pages/Echars/BigKhFl' },
          { path: '/home/khf2', component: '@/pages/Echars/BigKhFz' },
          // 图表路由
          {
            path: '/home/echars',
            component: '@/pages/SalesPortal/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 系统
          {
            path: '/home/system/adduser',
            component: '@/pages/Home/system/userCtrl/adduser',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/userlist',
            component: '@/pages/Home/system/userCtrl/userlist',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/upPassword',
            component: '@/pages/Home/system/userCtrl/upPassword',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          {
            path: '/home/system/addRole',
            component: '@/pages/Home/system/roleSet/addRole',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/authSet',
            component: '@/pages/Home/system/roleSet/authSet',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/roleList',
            component: '@/pages/Home/system/roleSet/roleList',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 部门路由
          {
            path: '/home/system/SetOrg',
            component: '@/pages/Home/system/Org/SetOrg',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/orgMap',
            component: '@/pages/Home/system/Org/orgMap',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          {
            path: '/home/system/Setparent',
            component: '@/pages/Home/system/Org/Setparent',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/shengfen',
            component: '@/pages/Home/system/base/shengfen',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/category',
            component: '@/pages/Home/system/base/Category',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/system/attribute',
            component: '@/pages/Home/system/base/Attr',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          // 通知模块路由
          {
            path: '/home/notice/news',
            component: '@/pages/Home/Notice/News',
          },
          // 库存管理
          {
            path: '/home/stock',
            component: '@/pages/Home/stock/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/stock/ruku',
            component: '@/pages/Home/stock/ruku',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/stock/chuku',
            component: '@/pages/Home/stock/chuku',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 销售管理
          {
            path: '/home/sale',
            component: '@/pages/Home/sale/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 智能建模
          {
            path: '/home/intelligence/navAd',
            component: '@/pages/Home/Intelligence/three',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 生产管理
          {
            path: '/home/production',
            component: '@/pages/Home/production/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 财务管理
          {
            path: '/home/finance',
            component: '@/pages/Home/Finance/index',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 资料模块路由路由
          {
            path: '/home/data/mydata',
            component: '@/pages/Home/Data/MyData',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/data/datacenter',
            component: '@/pages/Home/Data/DataCenter',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/data/datatype',
            component: '@/pages/Home/Data/DataType',
          },

          // 个人
          {
            path: '/home/person/report',
            component: '@/pages/Home/person/report',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/backlog',
            component: '@/pages/Home/person/backlog',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          {
            path: '/home/person/done',
            component: '@/pages/Home/person/done',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/leave',
            component: '@/pages/Home/person/leave',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/destroy',
            component: '@/pages/Home/person/destroy',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/exam',
            component: '@/pages/Home/person/exam',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/come',
            component: '@/pages/Home/person/come',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/person/overtime',
            component: '@/pages/Home/person/overtime',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 任务
          {
            path: '/home/initiate/task',
            component: '@/pages/Home/Task/initiatetask',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/mytask',
            component: '@/pages/Home/Task/mytask',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/backlog',
            component: '@/pages/Home/Task/agency',

            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/accomplish',
            component: '@/pages/Home/Task/done',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/rank',
            component: '@/pages/Home/Task/jibie',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/monitoring',
            component: '@/pages/Home/Task/jianting',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/initiate/notify',
            component: '@/pages/Home/Task/zhihui',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/taskxiangxi',
            component: '@/pages/Home/Task/xiangxi',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // 流程
          {
            path: '/home/flow/sponsor',
            component: '@/pages/Home/flow/sponsor',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/backlog',
            component: '@/pages/Home/flow/backlog',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/accomplish',
            component: '@/pages/Home/flow/accomplish',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/proposer',
            component: '@/pages/Home/flow/proposer',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/journey',
            component: '@/pages/Home/flow/journey',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/flow/monitoring',
            component: '@/pages/Home/flow/monitoring',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          // {
          //   path: '/home/flow/unread',
          //   component: '@/pages/Home/flow/unread',
          //   exact: true,
          //   wrappers: ['@/wrappers'],
          // },

          // 通知模块路由
          {
            path: '/home/notice/administration',
            component: '@/pages/Home/Notice/natice_type',
          },
          {
            path: '/home/news',
            component: '@/pages/Home/New',
          },
          {
            path: '/home/notice/classify',
            component: '@/pages/Home/Notice/addtype',
          },
          // 姓名路由
          {
            path: '/home/MyMessage',
            component: '@/pages/Home/MyMessage',
          },

          //报告模块
          {
            path: '/home/report/daily',
            component: '@/pages/Home/Report/daily',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/weekly',
            component: '@/pages/Home/Report/weekly',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/monthly',
            component: '@/pages/Home/Report/monthly',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/semester',
            component: '@/pages/Home/Report/semester',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/annual',
            component: '@/pages/Home/Report/annual',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/subordinate',
            component: '@/pages/Home/Report/subordinate',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/subordinateAll',
            component: '@/pages/Home/Report/subordinateAll',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/allReport',
            component: '@/pages/Home/Report/allReport',
            exact: true,
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/report/opinion',
            component: '@/pages/Home/Report/opinion',
            exact: true,
            wrappers: ['@/wrappers'],
          },

          // 采购管理
          {
            path: '/home/purchase',
            component: '@/pages/Home/Purchase',
          },
          // 详情页
          {
            path: '/home/detail',
            component: '@/pages/Home/Detail',
          },
          // 计划模块
          {
            path: '/home/plan/dailyplan',
            component: '@/pages/Home/Plan/Day',
            wrappers: ['@/wrappers'],
          },
          {
            path: '/home/plan/weeklyplan',
            component: '@/pages/Home/Plan/Week',
            wrappers: ['@/wrappers'],
          },
          // 主页表格详情页
          {
            path: '/home/hometable',
            component: '@/pages/Hometablexiangxi',
            wrappers: ['@/wrappers'],
          },
          { component: '@/pages/Cuowu.js' }, //如果路由不正确就跳404
        ],
      },
    ],
  },
  { path: '/', redirect: '/login' },
];

export default routes;
